The present invention relates to printing systems and methods and, in particular, to apparatus and techniques for printing an image with a reduced need for memory.
A laser printer can be a fairly complex device having a self-contained computer system, usually referred to as a microprocessor based controller. The controller can have a microprocessor, 1 Mb of read only memory (ROM) and 2 Mb of random access memory (RAM). In many installations, the personal computer driving the laser printer may be slower and have less memory than the printer. Moreover, some sophisticated laser printers may employ a hard disk for handling complicated, high definition images.
Some laser printers include an interpreter that can respond to drawing commands such as: draw a line from point x1, y1 to point x2, y2. Even more sophisticated programming languages have been incorporated in ROM in some printers. Some fairly rich programming languages employ variables, looping, flow control, procedures (subroutines), arithmetic operations and most of the features offered by programming languages such as Basic or C. Accordingly, programs designed to drive such a sophisticated printer need only send programming commands, which then are interpreted by the printer to produce a two dimensional image.
When converting these programming instructions into an image, such a printer can produce a bit map image, that is, a pixel by pixel representation of the printed page. The term pixel refers to a small picture element, or its digital representation, large identical numbers of which are arranged to form an image. The bit map image is typically organized into a plurality of image lines each having none to many pixels. With such an organization a monochrome image at 300 dots per inch, on a 8.5″ by 11″ page, requires about 1 Mb of memory. The memory requirement quickly escalates for color or higher definition images.
Because of this high memory requirement, various techniques have been employed to reduce the memory demand. One known approach involves compressing the digital data in the image lines. For example, an image line may have a large amount of “white” space represented by an interval with repeating identical data bytes. Accordingly, these repeating bytes can be reduced to a code indicating the number of repetitions and the byte repeated.
Known compression techniques also include predictive encoding. Input data is scanned for repeated bytes, but is also scanned for consecutive bytes that differ by +/− 1 bit from the previous byte. The compression code requires only two bytes for repeats up to 63 and three bytes for all others. Slowly varying bit patterns are common for certain types of graphics and this predictive encoding works well with this type of information. Predictive encoding has also been employed with look up tables and binary arithmetic coding. This type of encoding can produce a very dense compression.
Other known compression techniques have been published under the JPEG Standard, such as the discrete cosine transform. This transform guarantees a certain amount of compression, which can be arbitrarily set at the time compression begins. The compression ratio can be set arbitrarily high, but will eventually cause a loss of visual detail, which may or may not be acceptable depending upon the application. At compression ratios 3:1 or 4:1 very little visual detail is lost.
An unsophisticated approach to reducing the memory requirements would be to prepare a data bit map with every stored image line compressed. With this process an image is normally assembled line by line, requiring the controller to revise image lines many times. The resulting difficulty is the large amount of time spent compressing and decompressing image lines as the image is assembled.
When all of the data is compressed at the computer and sent compressed to the printer, large amounts of memory are required at the computer, but not at the printer. Requiring that the printer decompress every line of the image can slow the printing process unacceptably.
For example, U.S. Pat. No. 4,901,248 shows a scheme for compressing alphanumeric data being sent to a printer. Space codes are nullified and pitch data corresponding to the space code is added instead. In another example, U.S. Pat. No. 4,641,263 shows a microprocessor used to emulate a local parallel printer. This microprocessor compresses the print data and transmits it serially for decompression at a remote printer. Other known techniques can magnify type fonts so that different sizes can be printed (see for example, U.S. Pat. Nos. 4,367,533 and 4,879,666; as well as U.S. Pat. No. 4,278,359 for adjusting the lateral velocity of a dot matrix printer head).
Another known technique is to reduce the relatively high programming commands to a “display list.” This display list can be a longer list of simplified directions. For example a circle is listed as a large number of very short lines forming a polygon. Next, a banding technique can be invoked to create a bit image, but only for a horizontal band at the top of the page. The printer engine then starts printing this band while a bit map is being created for a second contiguous band. The total amount of memory required for this method depends on the height of the bands and the amount of memory reserved for the display list. In practice, the display list and bands share memory and the size of the band is determined at print time by the amount of memory that is left.
The difficulty with the banding approach is the need to completely map the next band before the prior band is done printing; otherwise the printer must stop. Although some laser printers can be stopped mid-page, a significant number of existing laser printers should not be stopped at mid-page or a streak or blank gap will form. Thus, for relatively complex images, the banding method is unsatisfactory for general application.
Accordingly, there is a need for a printing system and method that is able to produce an image without interruption, and with a reduced memory demand.